﻿using System;

namespace Microsoft.Modeling.StoryboardDesigner.DslPackage.Extensions.Common
{
    internal static class ServiceProviderExtensions
    {
        internal static T GetService<T>(this IServiceProvider serviceProvider)
        {
            return (T)serviceProvider.GetService(typeof(T));
        }

        internal static T GetService<T, S>(this IServiceProvider serviceProvider)
        {
            return (T)serviceProvider.GetService(typeof(S));
        }
    }
}